#!/bin/bash
# description: Rsync war file
# version: 1.0
#
. functions.sh

GENERIC_SRC=smx@${DL_SERVER}:/opt/www/ops30.sumilux.com


if [ ! -e /tmp/vagrant-cache/wget ]; then
mkdir -p /tmp/vagrant-cache/wget
fi

echo "--> Begin to download jdk1.8 package"
if [ ! -e /tmp/vagrant-cache/wget/jdk1.8/jdk-8u45-linux-x64.rpm ]; then
rsync ${RSYNC_OPTS} -e "${RSH_OPTS}" ${GENERIC_SRC}/jdk1.8 /tmp/vagrant-cache/wget/
fi

echo "--> Begin to download fonts file"
if [ ! -e /usr/share/fonts ]; then
mkdir -p /usr/share/fonts
fi

FONTS_FILE_SRC=${GENERIC_SRC}/fonts/
FONTS_FILE_DST=/usr/share/fonts/
rsync -av -e "${RSH_OPTS}" ${FONTS_FILE_SRC} ${FONTS_FILE_DST}
